# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1313696013.651014
_template_filename='/home/bastian/workspaces/c-chrysalide/trunk/portal/portal/templates/dashboard/modif_page.mako'
_template_uri='/dashboard/modif_page.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['title']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/dashboard/site.mako', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        request = context.get('request', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 2
        __M_writer(u'\n<div style="padding: 20px;">\n<div>\n\t')
        # SOURCE LINE 5
        __M_writer(c.message )
        __M_writer(u'\n')
        # SOURCE LINE 6
        if request.params.get('modified_page') == 'yes':
            # SOURCE LINE 7
            __M_writer(u"\t\t<span class='success_message'>La page a ete correctement modifier</span>\n")
            # SOURCE LINE 8
        elif request.params.get('modified_page') == 'no':
            # SOURCE LINE 9
            __M_writer(u"\t\t<span class='error_message'>La page n'a pas etre modifiee - veulliez signaler l'incident au webmaster s'il vous plais</span>\n")
            pass
        # SOURCE LINE 11
        __M_writer(u'\t</div>\n<p>Modification de la page > ')
        # SOURCE LINE 12
        __M_writer(escape(c.page.name))
        __M_writer(u' <</p>\n\n<form  method="post" action="/dashboard/modif_page_submit" style="width: 1000px;  ">\n\t<div>\t\n\t\t<textarea name="content" id="page_content">')
        # SOURCE LINE 16
        __M_writer(escape(c.page.content))
        __M_writer(u'</textarea>\n\t</div>\n\t\t<input type="hidden" name="id" value="')
        # SOURCE LINE 18
        __M_writer(escape(c.page.id))
        __M_writer(u'" />\n\t\t<input type="hidden" name="name" value="')
        # SOURCE LINE 19
        __M_writer(escape(c.page.name))
        __M_writer(u'" />\n\t\t\n\t\t<p style="background: white;"><input type="submit" value="Envoyer" /> - <a href="/dashboard">Annuler</a></p>\n\t</form>\n</div>\n\n<script type="text/javascript">\n$(document).ready(function() {\n\tCKEDITOR.replace( \'page_content\' );\n\tCKEDITOR.config.height = \'600px\';\n\tCKEDITOR.config.language = \'fr\';\n\tCKEDITOR.config.contentsCss = \'/ckeditor/mysitestyles.css\';\n\tCKEDITOR.config.uiColor = \'grey\';\n\twindow.onbeforeunload = function (e) {\n\t\t  e = e || window.event;\n\n\t\t  // For IE and Firefox prior to version 4\n\t\t  if (e) {\n\t\t    e.returnValue = \'Any string\';\n\t\t  }\n\n\t\t  // For Safari\n\t\t  return \'Any string\';\n\t\t};\n});\n</script>')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_title(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'Dashboard - Modification de page')
        return ''
    finally:
        context.caller_stack._pop_frame()


